<?php

namespace App\Policies\Admin;

use App\Models\Category;
use App\Models\Role;
use App\Models\User;
use App\Policies\BasePolicy;
use Illuminate\Auth\Access\HandlesAuthorization;

class CategoryPolicy extends BasePolicy
{
    use HandlesAuthorization;

    /**
     * 显示列表
     */
    public function viewAny(User $user)
    {
        // 检查是否登录
    }

    /**
     * 显示单条数据
     */
    public function view(User $user, Category $category)
    {
        // 检查是否有权限
    }

    /**
     * 创建分类
     */
    public function create(User $user)
    {
    }

    /**
     * 修改分类
     */
    public function update(User $user, Category $category)
    {
        // 检查是否有权限修改
    }

    /**
     * 禁用分类
     */
    public function delete(User $user, Category $category)
    {
        // 检查是否有权限删除
    }
}
